package com.jxzyk.http.req;

import android.content.Context;

import com.core.entity.params.ReqParams;
import com.jxzyk.config.API;
import com.jxzyk.http.BaseRequest;
import com.jxzyk.http.Query;

public class QARequest extends BaseRequest {

	public QARequest(Context context) {
		super(context);
	}

	public QARequest(Context context, String url) {
		super(context, url);
	}

	@Override
	public String getUrl() {
		return getURL();
	}

	@Override
	public ReqParams getParams() {
		Query query = getQuery();
		switch (getURL()) {
		case API.QA.list:
			if (query != null) {
				params = query.toParams();
			}
			return params;
		case API.QA.list_user:
			if (query != null) {
				params = query.toParams();
			}
			return params;
		case API.QA.list_qa:
			if (query != null) {
				params = query.toParams();
			}
			return params;
		case API.QA.publish:

			if (query != null) {
				params = query.toParams();
			}
			return params;
		case API.QA.answer:

			if (query != null) {
				params = query.toParams();
			}
			return params;
		case API.QA.getQuestion:

			if (query != null) {
				params = query.toParams();
			}
			return params;
		default:
			return null;
		}

	}

	@Override
	public OnDialogListener getListener() {
		// TODO Auto-generated method stub
		return null;
	}

}
